Product : ISaGRAF V3
Date : 5-March-1996
File : Ioincyc.How to perform IO operations inside the cycle.htm
Subject : How to perform IO operations inside the ISaGRAF cycle?
Keywords: OPERATE - I/O update
___________________________________________________________________
It is possible with ISaGRAF to perform fast I/O handling during the
cycle, if this is supported by the ISaGRAF I/O driver. The idea is
to use the OPERATE call to achieve a single input or output
operation. Just prepare such entries in OEM driver (in oem_call
entry of str_iovar):
1: Operate: immediate scan of an input channel:
- code = function identifier (ex: 'SCAN_NOW' defined word)
- argument = 0 (unused)
- return value = input value (casted to integer type)
2: Operate: immediate refresh of an output channel:
- code = function identifier (ex: 'UPDATE_NOW' defined word)
- argument = output value casted to integer type (*)
- return value = return check (OK / not OK)
(*) this cannot be applied to message variables.
This may lead to such a programming in the application:
(* Example: ST with OPERATE calls for immediate I/O handling *)
imm_value := Operate (MyInputVar, SCAN_NOW, 0);
If imm_value <> 0 Then
rc := Operate (MyOutputVar, UPDATE_NOW, imm_value);
rc := Operate (MyOutputAlrm, UPDATE_NOW, 1);
End_If;
____________________________________________________________________
Copyright © 1996-2009 ICS Triplex ISaGRAF Inc. All rights reserved.